package mianxiangduixiang.Test6.T3;

import java.util.Random;
import java.util.TreeSet;

/**
 * @Author JetZhang
 * @Date 2021/11/4
 */
public class Test3 {
    public static void main(String[] args) {
        TreeSet<Book> treeSet = new TreeSet<>();
        for (int i = 0; i < 5; i++) {
            treeSet.add(new Book(new Random().nextInt(10)  + "Testt", new Random().nextInt(10)  + "title", new Random().nextInt(10)  + "author"));
        }
        for (Book book:treeSet){
            System.out.println(book.toString());
        }
    }
}
